import request from "../request";

//台区拓扑维护
//场站拓扑维护弹框列表
export function getStationShowList(data) {
  return request({
    url: "car/assetStation/list",
    method: "get",
    params: data
  });
}

//新增场站名称
export function getStationName(data) {
  return request({
    url: "car/assetStation/getStationInfo",
    method: "post",
    data: data
  });
}

//台区告警
export function platformAlarm(data) {
  return request({
    url: "car/loadDistribution/platformAlarm",
    method: "get",
    params: data
  });
}



// 实时监测
export function realtimeMonitor(data) {
  return request({
    url: "car/interactionIncident/MonitorCurvesInRealTime",
    method: "get",
    params: data
  });
}




//场站列表
export function getStationList(data) {
  return request({
    url: "car/carTransformerProperty/list",
    method: "get",
    params: data
  });
}

//查询所有场站
export function findStationList(data) {
  return request({
    url: "car/assetStation/fandList",
    method: "get",
    params: data
  });
}



// 首页通讯状态

export function communicationStatus(data) {
  return request({
    url: "car/hdtkStationGunCountZr/findSum",
    method: "get",
    params: data
  });
}

// 事件总览：
export function queryCountEvent(data) {
  return request({
    url: "car/interactionIncident/countEvent",
    method: "get",
    params: data
  });
}

// 调控总览：
export function queryCommunicationStatus(data) {
  return request({
    url: "car/interactionIncident/countRegulation",
    method: "get",
    params: data
  });
}

//场站拓扑维护列表 - 站 type = 1
export function getStationStandingList(data) {
  return request({
    url: "car/carTransformerProperty/list",
    method: "get",
    params: data
  });
}

//场站拓扑维护列表 - 桩 type = 2
export function getStationpPileList(data) {
  return request({
    url: "car/carTransformerProperty/findByList",
    method: "get",
    params: data
  });
}

//阀值修改提交
export function editThresholdValue(data) {
  return request({
    url: "car/carTransformer/edit",
    method: "post",
    data: data
  });
}

//查询所有桩列表
export function getPileList(data) {
  return request({
    url: "car/tAssetStake/list",
    method: "get",
    params: data
  });
}


//拓扑树
export function getTree(data) {
  return request({
    url: "car/assetStation/findTopologyTree",
    method: "get",
    params: data
  });
}

//台区信息
export function taiAreaInformation(data) {
  return request({
    url: "car/carTransformer/getInfo",
    method: "get",
    params: data
  });
}

//桩拓扑维护列表配置提交
// export function pileListDisposition(data) {
//   return request({
//     url: "car/tAssetStake/edit",
//     method: "post",
//     data: data
//   });
// }

//台区拓扑维护列表配置提交
export function listnDisposition(data) {
  return request({
    url: "car/carStationAccount/edit",
    method: "post",
    data: data
  });
}

//桩拓扑维护列表配置回显
export function pileListEcho(data) {
  return request({
    url: "car/tAssetStake/getInfo",
    method: "get",
    params: data
  });
}

//台区拓扑维护列表配置回显
export function listEcho(data) {
  return request({
    url: "car/assetStation/getInfo",
    method: "get",
    params: data
  });
}

//导入Excel
export function importExcel(data) {
  return request({
    url: "car/assetStation/importCarTopology",
    method: "get",
    params: data
  });
}

//台区负荷监测
//实时数据
export function realtimeData(data) {
  return request({
    url: "car/carTransformerRealData/getById",
    method: "get",
    params: data
  });
}

//负荷分布
export function loadDistribution(data) {
  return request({
    // url: "car/assetStation/findLngAndLat",
    url: "car/loadDistribution/list",
    method: "get",
    params: data
  });
}

//消除报警
export function eidtloadDistribution(data) {
  return request({
    url: "car/loadDistribution/edit",
    method: "post",
    data: data
  });
}

// 台区基本信息 导出
export function assetStationExport(data) {
  return request({
    url: "car/assetStation/export",
    method: "get",
    responseType: 'blob',  //需要在此处设置请求头，设置请求的类型为blob文件流的形式
    headers: { 'Content-type': 'application/json;' },
    params: data
  });
}


// 场站拓扑维护导出


export function stationExport(data) {
  return request({
    url: "car/assetStation/exportdata",
    method: "get",
    responseType: 'blob',  //需要在此处设置请求头，设置请求的类型为blob文件流的形式
    headers: { 'Content-type': 'application/json;' },
    params: data
  });
}



// 查询城区
export function getCity(data) {
  return request({
    url: "car/area/getCity",
    method: "get",
    params: data
  });
}

// 修改互动事件
export function editIteractionIncident(data) {
  return request({
    url: "car/interactionIncident/editinfo",
    method: "post",
    data: data
  });
}


// 删除互动事件
export function delIteractionIncident(data) {
  return request({
    url: "car/interactionIncident/delete",
    method: "get",
    params: data
  });
}


//场站负荷监测
//实时数据列表
export function fieldstationRealtimeData(data) {
  return request({
    url: "car/carAmmeterRealData/getById",
    method: "get",
    params: data
  });
}

//互动调控-调控分组
//新增分组
export function addGrouping(data) {
  return request({
    url: "car/groupingRegulate/edit",
    method: "post",
    data: data
  });
}
//运营商名称
export function tContractOperator(data) {
  return request({
    url: "car/tContractOperator/findList",
    method: "get",
    params: data
  });
}


//查询所有场站信息
export function getStationlist(data) {
  return request({
    url: "car/assetStation/stationlist",
    method: "get",
    params: data
  });
}





//分组列表
export function groupingList(data) {
  return request({
    url: "car/groupingRegulate/list",
    method: "post",
    data: data
  });
}

//分组列表带查询条件
export function selectGroupInfo(data) {
  return request({
    url: "car/groupingRegulate/selectGroupInfo",
    method: "post",
    data: data
  });
}





//分组编辑回显
export function groupingEcho(data) {
  return request({
    url: "car/groupingRegulate/getInfo",
    method: "get",
    params: data
  });
}

//分组删除
export function groupingRemove(data) {
  return request({
    url: "car/groupingRegulate/remove",
    method: "post",
    data: data
  });
}

//互动事件
//新增互动
export function addInteraction(data) {
  return request({
    url: "car/interactionIncident/edit",
    method: "post",
    data: data
  });
}

//新增互动 - 补贴方案
export function subsidySchemeData(data) {
  return request({
    url: "car/carSubsidy/findList",
    method: "get",
    params: data
  });
}

//详情
export function getInteractionDetails(data) {
  return request({
    url: "car/interactionIncident/getInfo",
    method: "get",
    params: data
  });
}

//负荷预测
//可调潜力同步
//可调潜力同步列表
export function adjustablePotentialList(data) {
  return request({
    url: "car/carAdjustablePotential/list",
    method: "get",
    params: data
  });
}

//日前负荷预测 - 设置提交
export function influencingFactorSub(data) {
  return request({
    url: "car/carGroupSpecific/edit",
    method: "post",
    data: data
  });
}

//社会运营商-档案管理
//运营商列表
export function getOperatorsList(data) {
  return request({
    url: "car/tContractOperator/list",
    method: "get",
    params: data
  });
}

//新增/编辑运营商
export function addedOperators(data) {
  return request({
    url: "car/tContractOperator/edit",
    method: "post",
    data: data
  });
}

//回显运营商
export function echoOperators(data) {
  return request({
    url: "car/tContractOperator/getById",
    method: "get",
    params: data
  });
}

//删除运营商
export function removeOperators(data) {
  return request({
    url: "car/tContractOperator/remove",
    method: "post",
    data: data
  });
}

//申请表列表
export function applicationformList(data) {
  return request({
    url: "car/applyFor/list",
    method: "get",
    params: data
  });
}

//申请表列表-新增申请表
export function addApplicationform(data) {
  return request({
    url: "car/applyFor/edit",
    method: "post",
    data: data
  });
}

//申请表列表-删除申请表
export function removeApplicationform(data) {
  return request({
    url: "car/applyFor/remove",
    method: "post",
    data: data
  });
}

//申请表列表-申请表详情
export function ApplicationformDetails(data) {
  return request({
    url: "car/applyFor/getById",
    method: "get",
    params: data
  });
}


//互动调控-互动事件
export function getInteractionIncident(data) {
  return request({
    url: "car/interactionIncident/list",
    method: "get",
    params: data
  });
}

//效果评估-补贴管理
//补贴管理列表
export function subsidyManagementList(data) {
  return request({
    url: "car/carSubsidy/list",
    method: "get",
    params: data
  });
}

//补贴管理 新增
export function addSubsidyManagement(data) {
  return request({
    url: "car/carSubsidy/edit",
    method: "post",
    data: data
  });
}

//补贴管理 详情
export function echoSubsidyManagement(data) {
  return request({
    url: "car/carSubsidy/getById",
    method: "get",
    params: data
  });
}

//补贴管理 删除
export function removeSubsidyManagement(data) {
  return request({
    url: "car/carSubsidy/remove",
    method: "post",
    data: data
  });
}
//有序充电

//台区事件列表/查询
export function platformEventList(data) {
  return request({
    url: "car/carCourtsEmergency/list",
    method: "get",
    params: data
  });
}

//正在执行需求
export function queryIncidentAll(data) {
  return request({
    url: "car/interactionIncident/all",
    method: "get",
    params: data
  });
}


//聚合单元管理列表/查询
export function polymerizationUnitList(data) {
  return request({
    url: "car/carAggregationUnit/list",
    method: "get",
    params: data
  });
}

//聚合单元管理回显
export function getInfoPolymerizationUnit(data) {
  return request({
    url: "car/carAggregationUnit/getInfo",
    method: "get",
    params: data
  });
}

//充电枪列表/查询
export function chargingGunList(data) {
  return request({
    url: "car/tAssetConnector/list",
    method: "get",
    params: data
  });
}

//聚合单元管理新增/修改
export function editPolymerizationUnit(data) {
  return request({
    url: "car/carAggregationUnit/edit",
    method: "post",
    data: data
  });
}

//聚合单元管理删除
export function removePolymerizationUnit(data) {
  return request({
    url: "car/carAggregationUnit/remove",
    method: "post",
    data: data
  });
}
// 互动事件计划编制确定按钮
export function carPlanProupEdit(data) {
  return request({
    url: "car/carPlanProup/edit",
    method: "post",
    data: data
  });
}

// 互动事件计划编制 选择分组 确定按钮
export function carPlanProupEditinfo(data) {
  return request({
    url: "car/carPlanProup/editInfo",
    method: "post",
    data: data
  });
}



// 互动时间-效果评估
export function getEffectAppraisal(data) {
  return request({
    url: "car/interactionIncident/effectAppraisal",
    method: "get",
    params: data
  });
}

// 这个是日前潜力分析表
export function carPotentialAnalyse(data) {
  return request({
    url: "car/carPotentialAnalyse/edit",
    method: "post",
    data: data
  });
}

// 查询页面
export function interactionIncident(data) {
  return request({
    url: "car/interactionIncident/getById",
    method: "get",
    params: data
  });
}


export function changeStatus(data) {
  return request({
    url: "car/interactionIncident/changeStatus",
    method: "get",
    params: data
  });
}



// 保存图表数据
export function addCarPotentialAnalyseChart(data) {
  return request({
    url: "car/carPotentialAnalyse/add",
    method: "post",
    data: data
  });
}

// 查询日前负荷预测
export function getCarGroupSpecific(data) {
  return request({
    url: "car/carGroupSpecific/getInfo",
    method: "get",
    params: data
  });
}


//台区拓扑维护中的场站详情
export function getAssetStation(data) {
  return request({
    url: "car/assetStation/getById",
    method: "get",
    params: data
  });
}

//台区拓扑维护中的场站详情
export function getAssetSubstation(data) {
  return request({
    url: "car/transformerSubstation/getById",
    method: "get",
    params: data
  });
}

//台区拓扑维护中的台区详情
export function getCarTransformer(data) {
  return request({
    url: "car/carTransformer/getById",
    method: "get",
    params: data
  });
}
//互动调控-互动事件-编制计划-下发指令
export function getIncidentBytime(data) {
  return request({
    url: "car/interactionIncident/getByTime",
    method: "post",
    data: data
  });
}
//互动调控-互动事件-编制计划-保存数据
export function getIncidentSaveOrder(data) {
  return request({
    url: "car/interactionIncident/saveOrder",
    method: "post",
    data: data
  });
}

//互动调控-互动事件-详情-取消调控
export function cancelRegbtn(data) {
  return request({
    url: "car/carSendOrder/cancel",
    method: "get",
    params: data
  });
}

//日前负荷预测
export function getPredictionCurve(data) {
  return request({
    url: "car/carAdjustablePotential/getPredictionCurve",
    method: "get",
    params: data
  });
}

//日前负荷预测-曲线导出
export function carExport(data) {
  return request({
    url: "car/carAdjustablePotential/export",
    method: "get",
    responseType: 'blob',  //需要在此处设置请求头，设置请求的类型为blob文件流的形式
    headers: { 'Content-type': 'application/json;' },
    params: data
  });
}
// 保存下发指令

export function saveOrder(data) {
  return request({
    url: "car/carSendOrder/saveOrder",
    method: "post",
    data: data
  });
}

// 需求目标曲线保存

export function carSave(data) {
  return request({
    url: "car/carSendOrder/save",
    method: "post",
    data: data
  });
}


//互动事件-互动监控
export function getRealInfo(data) {
  return request({
    url: "car/carTransformerRealData/getRealInfo",
    method: "get",
    params: data
  });
}

//互动事件-调控命令信息 
export function getPlanRegulateOrder(data) {
  return request({
    url: "car/carPlanRegulateOrder/list",
    method: "get",
    params: data
  });
}

export function getCurve(data) {
  return request({
    url: "car/carSendOrder/getCurve",
    method: "get",
    params: data
  });
}

//运营商响应总量TOP5
export function responseTotalTop5(data) {
  return request({
    url: "car/tContractOperator/responseTotalTop5",
    method: "get",
    params: data
  });
}
//运营商收益占比

export function revenuePercentage(data) {
  return request({
    url: "car/tContractOperator/revenuePercentage",
    method: "get",
    params: data
  });
}
export function searchAddress(data) {
  return request({
    url: "car/assetStation/searchAddress",
    method: "get",
    params: data
  });
}
//运营商效果评估条件筛选
export function findContractOperatorList(data) {
  return request({
    url: "car/tContractOperator/findContractOperatorList",
    method: "get",
    params: data
  });
}
//运营商效果评估条件筛选详情
export function effectAppraisal(data) {
  return request({
    url: "car/tContractOperator/effectAppraisal",
    method: "get",
    params: data
  })
}
